package com.itheima.service.impl;

import com.itheima.controller.User;
import com.itheima.dao.UserDao;
import com.itheima.dao.impl.UserDaoImpl;
import com.itheima.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    private UserDao userDao;
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void save() {
        userDao.save();
    }

    @Override
    public User login(String username, String password) {
        UserDao userDao=new UserDaoImpl();
       User user= userDao.login(username, password);
       return user;
    }
}
